//
//  NewspaperCell.m
//  JianChaRiBao
//
//  Created by yuzhou on 13-5-14.
//  Copyright (c) 2013年 wzyk. All rights reserved.
//

#import "NewspaperCell.h"
#import "NewspaperCategoryView.h"
@interface NewspaperCell()
{
    NewspaperCategoryView * newspaperCategoryView;
}

@end

@implementation NewspaperCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        newspaperCategoryView = [[[NSBundle mainBundle] loadNibNamed:@"NewspaperCategoryView" owner:self options:nil] objectAtIndex:0];
        [self.contentView addSubview:newspaperCategoryView];

    }
    return self;
}

- (void)setCategory:(NSDictionary *)category title:(NSString *)title{
    newspaperCategoryView.category = category;
    newspaperCategoryView.titleStr = title;

}

- (void)updateDisplay:(NSArray *)array title:(NSString *)title{
    [newspaperCategoryView reloadDataWithArray:array title:title];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
